-- GENERATED SPELL FOR [Deatholme Acolyte] --


function spell0_16315(pUnit, Event) --@Demon Skin,Self--
pUnit:FullCastSpellOnTarget(20798,pUnit)
pUnit:RegisterEvent('Sorts_16315', 0, 1)
end

function spell1_16315(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16315', 18000, 1)
end

function Sorts_16315(pUnit, Event)
local choix_sorts_16315 = math.random(0, 1)
if choix_sorts_16315 == 0 then
pUnit:RegisterEvent('spell0_16315', 1, 1)
end
if choix_sorts_16315 == 1 then
pUnit:RegisterEvent('spell1_16315', 1, 1)
end
end

function mob16315_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16315', math.random(1500, 3000), 1)
end

function mob16315_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16315_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16315_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16315, 1, 'mob16315_Action')
RegisterUnitEvent(16315, 2, 'mob16315_Leave')
RegisterUnitEvent(16315, 3, 'mob16315_Kill')
RegisterUnitEvent(16315, 4, 'mob16315_Die')
